package org.example.day20240827.homeWork;

public class Card {
    private String color;
    private Integer num;

    public Card(String color, Integer num) {
        this.color = color;
        this.num = num;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public String toString() {
        String result = "";
        switch (this.num) {
            case 1:
                result = "A";
                break;
            case 11:
                result = "J";
                break;
            case 12:
                result = "Q";
                break;
            case 13:
                result = "K";
                break;
            default:
                result = String.valueOf(this.num);
        }
        return color + result;
    }
}
